package com.xyzwps.lib.openapi.element;

import java.util.EnumSet;
import java.util.List;

public enum Style implements OASElement {

    MATRIX(In.PATH, "matrix"),
    LABEL(In.PATH, "label"),
    FORM(List.of(In.QUERY, In.COOKIE), "form"),
    SIMPLE(List.of(In.PATH, In.HEADER), "simple"),
    SPACE_DELIMITED(In.QUERY, "spaceDelimited"),
    PIPE_DELIMITED(In.QUERY, "pipeDelimited"),
    DEEP_OBJECT(In.QUERY, "deepObject");


    final EnumSet<In> in;
    final String value;

    Style(List<In> in, String value) {
        this.in = EnumSet.copyOf(in);
        this.value = value;
    }

    Style(In in, String value) {
        this.in = EnumSet.of(in);
        this.value = value;
    }

    @Override
    public void accept(OAEVisitor visitor) {
        visitor.visit(this);
    }
}
